BLE-Mesh is a wireless personal area network (WPAN) technology that uses a flooding-based protocol that with packet retransmission extends the range of BLE devices by including the ability to send messages to and amongst groups of devices. The devices in the BLE-Mesh network can support both BLE and BLE-mesh, but not necessarily both. A rebroadcasting mesh network works by flooding each message to all device nodes in the network through broadcasts.
The device nodes in the mesh network all share a set of indexed data slots. Each time a device receives a broadcast message from another device in the mesh, the device repeats the message (rebroadcasts it), enabling its neighboring devices to ‘hear’ the new message. This rebroadcast process is repeated until all devices in the mesh have received the same message. Flooding thus enables wireless devices to ‘talk’ to each other without being within a direct radio range, as devices between them help by relaying the messages. In a typical WPAN there are edge device(s) which are battery powered, relay devices that are always on as they are always in the listening mode, and there are functional end device(s) such as lights.
A BLE-Mesh specification can use time to live (TTL) and cache for flooding control. TTL limits the lifespan (or lifetime) of data in the mesh network by being implemented as a timestamp embedded in the data. Once a prescribed event count or the timespan has elapsed, the packet data is discarded so that when the TTL is zero there is no packet relaying.
Each packet contains the sender's unique source (SRC) address as well as a packet sequence (SEQ) number, and the payload can also be tagged with the type of message called a model. The packet specifies a unique address of each device in the mesh that can be derived from the device's Universally Unique Identifier (UUID). The SEQ number is a field indicating the sequence number of a message, which prevents device nodes from relaying packets that they have received before. For example, a single number bit may be used for the SEQ, where the SEQ number bit is initialized to 0 by the device upon entering the connection state, and where the SEQ number bit is changed (from 0 to 1, or vice versa if initialized to 1) for each new packet sent by the device, but is not changed when a packet is relayed (resent) by the device. Models are application implementations, such as a lighting model that defines the command to dim a light, or get status.
For packet addressing, besides a unique SRC address, the packet also contains the address to whom the packet is addressed. A network device that receives the packet checks if it is the intended receiver of the packet and then begins processing the information within. Devices that hear the packet but are not the intended receiver discard them, or send them back out as a broadcast. This relay function is possible, since a TTL counter is used. The packet will only be repeated so many times, and since packets that come around are being recognized as already received, they will not be repeated.